package com.mpgame.models;

import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

public class GameScene {
    private final String name;
    private final String sceneName;
    private final int maxPlayers;
    private final Set<Integer> players;

    public GameScene(String name, String sceneName) {
        this.name = name;
        this.sceneName = sceneName;
        this.maxPlayers = 100;
        this.players = ConcurrentHashMap.newKeySet();
    }
    public Set<Integer> getPlayers(){
        return players;
    }
    public boolean hasPlayer(int playerId){
        return players.contains(playerId);
    }
    public void addPlayer(int playerId) {
        players.add(playerId);
    }
    public void removePlayer(int playerId) {
        players.remove(playerId);
    }
    public int getPlayerCount() {
        return players.size();
    }
    public int getMaxPlayers() {
        return maxPlayers;
    }
}
